package com.wanmait.baohan.service.Impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.baohan.mapper.HotelAccountMapper;
import com.wanmait.baohan.pojo.HotelAccount;
import com.wanmait.baohan.service.HotelAccountService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class HotelAccountServiceImpl implements HotelAccountService {
    @Resource
    HotelAccountMapper hotelAccountMapper;
    @Override
    public void insert(HotelAccount object) {
        hotelAccountMapper.insert(object);
    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(HotelAccount object) {
        hotelAccountMapper.updateByPrimaryKey(object);
    }

    @Override
    public HotelAccount findById(Integer id) {
        return null;
    }

    @Override
    public List<HotelAccount> findAll() {
        return null;
    }

    @Override
    public List<HotelAccount> findAll(HotelAccount object) {
        return null;
    }

    @Override
    public PageInfo<HotelAccount> findPage(int pageNum) {
        return null;
    }

    @Override
    public PageInfo<HotelAccount> findPage() {
        return null;
    }

    @Override
    public PageInfo<HotelAccount> findPage(int pageNum, HotelAccount object) {
        return null;
    }

    @Override
    public PageInfo<HotelAccount> findPage(HotelAccount object) {
        return null;
    }

    @Override
    public List<HotelAccount> findByIdHotel(Integer id,Integer state) {
        return hotelAccountMapper.selectByHotel(id,state);
    }

    @Override
    public Integer findAllCost(Integer detailsId) {
        return hotelAccountMapper.selectAllPrice(detailsId);
    }
}
